#ifndef cexceptions_Throwable_h
#define cexceptions_Throwable_h

struct _Throwable;
typedef struct _Throwable * Throwable_t;

#include <cexceptions/TryCatchCases.h>

#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Wformat-extra-args"

Throwable_t Throwable_allocate(size_t count);
Throwable_t Throwable_construct(Throwable_t, int type, char * message, int code, Throwable_t previous, char * file, int line);
Throwable_t Throwable_clone(Throwable_t this, Throwable_t origin);
Throwable_t Throwable_destruct(Throwable_t);
int Throwable_getType(Throwable_t this);
char * Throwable_getMessage(Throwable_t this);
int Throwable_getCode(Throwable_t this);
Throwable_t Throwable_getPrevious(Throwable_t this);
char * Throwable_getFile(Throwable_t this);
int Throwable_getLine(Throwable_t this);

__attribute__((constructor)) void Throwable_register_printf_specifier();
__attribute__((destructor)) void Throwable_unregister_printf_specifier();

#endif